﻿CREATE TABLE [ODData].[ObservedCategory] (
    [CategoryID]             INT                 IDENTITY (1, 1) NOT NULL,
    [HierarchyCode]          [sys].[hierarchyid] NOT NULL,
    [HierarchyLevel]         AS                  ([HierarchyCode].[GetLevel]()),
    [CategoryCode]           VARCHAR (50)        NOT NULL,
    [CategoryDescription]    VARCHAR (500)       NOT NULL,
    [ClassificationSchemeID] INT                 NOT NULL
);

